/**
 * ourcarlife
 */
package com.whilefor.runner.modules.runner.entity;

import com.whilefor.runner.modules.sys.entity.User;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.whilefor.runner.common.persistence.DataEntity;

/**
 * 商品管理Entity
 * @author lins
 * @version 2016-04
 */
public class RunnerGoods extends DataEntity<RunnerGoods> {
	
	private static final long serialVersionUID = 1L;
	private User sellerId;		// 对应商家
	private String goodsPic;		// 商品logo
	private String goodsPrice;		// 商品价格
	private String goodsName;		// 名称
	private String goodsState;		// 商品状态
	private Date goodsEndTime;		// 结束时间
	private String goodsStar;		// 星级
	
	public RunnerGoods() {
		super();
	}

	public RunnerGoods(String id){
		super(id);
	}

	public User getSellerId() {
		return sellerId;
	}

	public void setSellerId(User sellerId) {
		this.sellerId = sellerId;
	}
	
	@Length(min=0, max=1000, message="商品logo长度必须介于 0 和 1000 之间")
	public String getGoodsPic() {
		return goodsPic;
	}

	public void setGoodsPic(String goodsPic) {
		this.goodsPic = goodsPic;
	}
	
	public String getGoodsPrice() {
		return goodsPrice;
	}

	public void setGoodsPrice(String goodsPrice) {
		this.goodsPrice = goodsPrice;
	}
	
	@Length(min=0, max=100, message="名称长度必须介于 0 和 100 之间")
	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}
	
	@Length(min=0, max=20, message="商品状态长度必须介于 0 和 20 之间")
	public String getGoodsState() {
		return goodsState;
	}

	public void setGoodsState(String goodsState) {
		this.goodsState = goodsState;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getGoodsEndTime() {
		return goodsEndTime;
	}

	public void setGoodsEndTime(Date goodsEndTime) {
		this.goodsEndTime = goodsEndTime;
	}
	
	@Length(min=0, max=10, message="星级长度必须介于 0 和 10 之间")
	public String getGoodsStar() {
		return goodsStar;
	}

	public void setGoodsStar(String goodsStar) {
		this.goodsStar = goodsStar;
	}
	
}